<template>
	<view class="container">
		<view class="intro">
			<image src="/static/logo.png" style="width: 130rpx;height: 130rpx;"></image>
			<view class="tips">
				<span style="font-size: 20px;">骑手端登录</span>
				<br>
				<span style="font-size: 30px;">类朴朴！畅通无阻！</span>
				
			</view>
		</view>
		<view class="bottom">
			
				<button  type="primary" size="default" class="login-btn"  lang="zh_CN" @click="login">
					<!-- <image src="https://express-img-1303869346.cos.ap-chengdu.myqcloud.com/static/images/mine/wechat.png"></image> -->
					骑手登录
				</button>
				<button  type="primary" size="default" class="register-btn"  lang="zh_CN" @click="register">
					骑手注册
				</button>
				
				
				
			<view class="d-flex flex-column justify-content-evenly align-items-center text-center" style="height: 30vh;">
				<view class="font-size-base text-color-primary"></view>
			</view>
		</view>
	</view>
</template>

<script>
	// import Member from '@/api/member'
	
	export default {
		data() {
			return {
				userinfo:{
					"openid":"",
					"session":""
				},
				userinfo2:{					
				}
			}
		},
		methods: {
			login(){
				uni.navigateTo({
					url: './riderlogin'
				})

					// var app=this;
					// uni.showLoading({title: '加载中'})
					// //查看本机是否有openid，没有的话进行登录操作
					// if(!uni.getStorageSync("openid")){
					// 	uni.getUserProfile({
					// 		desc:"Wexin" ,//这个参数是必须的
					// 		success: res => {
					// 			//获取user数据表
					// 			const dt=uniCloud.database().collection("t_user");
					// 			//成功拿到用户数据就赋值给userinfo2
					// 			app.userinfo2=res.userInfo;
					// 			uni.login({
					// 				success(res) {
					// 					let code=res.code;
					// 					uniCloud.callFunction({
					// 						name:"getopenid",
					// 						data:{
					// 							"code":code
					// 						},
					// 						success(res) {
					// 							app.userinfo.openid=res.result.oid;
					// 							var x1=app.userinfo;
					// 							var x2=app.userinfo2;
					// 							Object.assign(x1,x2);
					// 							dt.add(x1);
					// 							uni.setStorageSync("openid",res.result.oid);
					// 							uni.setStorageSync("userinf",x1);
					// 							uni.switchTab({
					// 								url:"../index/index"
					// 							})
					// 						}
					// 					})
					// 				}
					// 			})
					// 		}
					// 	})
					// }
					// else {
					// 	uni.switchTab({
					// 		url:"../index/index"
					// 	})
					// }
				},
				register(){
					uni.navigateTo({
						url: '../register/register'
					})
				},
				
		}
	}
</script>

<style lang="scss" scoped>
	.intro {
		width: 100%;
		height: 60vh;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-evenly;
		font-size: $font-size-base;
		color: $text-color-assist;
		
		image {
			width: 165rpx;
			height: 165rpx;
		}
		
		.tips {
			line-height: 72rpx;
			text-align: center;
		}
	}
	
	.bottom {
		height: 40vh;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		padding: 0 40rpx;
		
		.login-btn {
			width: 100%;
			border-radius: 50rem !important;
			display: flex;
			align-items: center;
			justify-content: center;
			padding: 10rpx 0;
			
			image {
				width: 36rpx;
				height: 30rpx;
				margin-right: 10rpx;
			}
		}
		.register-btn{
			width: 100%;
			border-radius: 50rem !important;
			display: flex;
			align-items: center;
			justify-content: center;
			padding: 10rpx 0;
			margin-top: 10px;
		}
		
		.row {
			.grid {
				width: 20%;
				image {
					width: 60rpx;
					height: 60rpx;
					margin-bottom: 10rpx;
				}
			}
		}
	}
</style>
